home *** CD-ROM | disk | FTP | other *** search
/ HTBasic 9.3 / HTBasic 9.3.iso / 83win / data1.cab / Basic_Plus_Examples / HPGLPANL < prev    next >
Text File  |  2001-03-02  |  1KB  |  27 lines

  1. 10    ! **********************************************************
  2. 20    ! Example: HPGL VIEW Widget in PANEL
  3. 30    !
  4. 40    ! This program first displays a mechanical drawing and
  5. 50    ! then displays a "Parts Dimension" display of the drawing.
  6. 60    ! You can use the scrollbars to look at any part of the
  7. 70    ! drawing.
  8. 80    !
  9. 90    ! **********************************************************
  10. 100   !
  11. 110  INTEGER Screen(1:4),S_width,S_height,Width,Height
  12. 120  GESCAPE CRT,3;Screen(*)
  13. 130  ASSIGN @Panel TO WIDGET "PANEL";SET ("X":0,"Y":0,"WIDTH":Screen(3)+1,"HEIGHT":Screen(4)+1,"TITLE":" Part Dimensions")
  14. 140  CONTROL @Panel;SET ("SYSTEM MENU":"Quit")
  15. 150  ON EVENT @Panel,"SYSTEM MENU" GOTO Finis
  16. 160  STATUS @Panel;RETURN ("INSIDE WIDTH":S_width,"INSIDE HEIGHT":S_height)
  17. 170  ASSIGN @Hpgl1 TO WIDGET "HPGL VIEW";SET ("BACKGROUND":0,"X":0,"Y":0,"WIDTH":S_width,"HEIGHT":S_height,"BORDER":0,"HPGL FILE":"HELP_EX/MECH.GL","RETAIN RASTER":1),PARENT @Panel
  18. 180  Width=(Screen(3)+1)/3
  19. 190  Height=(Screen(4)+1)/3
  20. 200  CONTROL @Panel;SET ("X":(Screen(3)-Width)/2,"Y":(Screen(4)-Height)/2,"WIDTH":Width,"HEIGHT":Height)
  21. 210  CONTROL @Panel;SET ("BACKGROUND":0,"SIZE CONTROL":"SCROLLABLE","SCROLL WIDTH":S_width,"SCROLL HEIGHT":S_height)
  22. 220  ON EVENT @Panel,"RESIZED" GOTO Looping
  23. 230 Looping: LOOP
  24. 240      WAIT FOR EVENT
  25. 250  END LOOP
  26. 260 Finis: END
  27.